package StringAlgorithm;

import java.util.HashMap;
import java.util.Map;

public class leet_76 {
    public static void main(String[] args) {
        String s = "ADOBECODEBANC";
        String t = "ABC";

        Solution_76 sou_76 =new Solution_76();
        String value = sou_76.minWindow(s, t);
        System.out.println(value);
    }

}


class Solution_76 {
    // 记录总共需要匹配的数量
    Map<Character, Integer> wordDict1 = new HashMap<>();
    // 记录移动中匹配到的数量
    Map<Character, Integer> wordDict2 = new HashMap<>();


    public String minWindow(String s, String t) {
        String value = "";
        if(s.length() < t.length() || s.length()==0){
            return value;
        }
        value = slideWindow(s, t);
        return value;
    }

    public String slideWindow(String allString, String key){
        // 最终的需要返回的结果字符串
        String lastValue = "";


        // 构建一个匹配字典
        Map<Character, Integer> wordDict = new HashMap<>();
        for(int i=0; i<key.length(); i++){
            // 关键字
            char keyWord = key.charAt(i);
            if(wordDict.keySet().contains(keyWord)){
                wordDict.put(keyWord, wordDict.get(keyWord) + 1);
            }else{
                wordDict.put(keyWord, 1);
            }
        }


        return lastValue;
    }

    public boolean judgeContain(String allString, Map<Character, Integer> wordDict){
        boolean isContain = false;

        return isContain;
    }

}
